package com.zp.system.exception;

import com.zp.system.api.entity.SysUser;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: zp-backstage
 * @ClassName SentinelException
 * @description:
 * @author: zhangpeng
 * @create: 2023-10-28 10:24
 * @Version 1.0
 **/
public class SentinelException {
    /**
     * 异常后熔断处理
     *
     * @param sysUser
     * @return
     */
    public static List<SysUser> fallback (SysUser sysUser) {
        List<SysUser> list = new ArrayList<>();
        sysUser.setExceptionCode("system模块出现异常，请联系管理员");
        list.add(sysUser);
        return list;
    }
}
